﻿<phone:PhoneApplicationPage
  x:Class="Renren.StatusPage"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
  xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="728"
  FontFamily="{StaticResource PhoneFontFamilyNormal}"
  FontSize="{StaticResource PhoneFontSizeNormal}"
  Foreground="{StaticResource PhoneForegroundBrush}"
  SupportedOrientations="Portrait"
  Orientation="Portrait"
  shell:SystemTray.IsVisible="False"
  
  xmlns:local="clr-namespace:Utils.UIEffect"
  xmlns:renren="clr-namespace:Renren.Controls"
  local:TiltEffect.IsTiltEnabled="True">

  <!--LayoutRoot is the root grid where all page content is placed-->
  <Grid x:Name="LayoutRoot" Background="Transparent" Margin="0,32,0,0">

    <Grid.RowDefinitions>
      <RowDefinition Height="auto" />
      <RowDefinition Height="auto" />
      <RowDefinition Height="auto" />
    </Grid.RowDefinitions>

    <renren:TitleBlock x:Name="TitleBlock"
                       Grid.Row="0" Source="/Images/status.png"
                       Margin="20,0"
                       VerticalAlignment="Top" />

    <TextBlock Grid.Row="1" Text="更新状态" Margin="22,-3,24,3" FontSize="72"/>

    <Grid Grid.Row="2" Margin="12">
      <StackPanel>
        <!-- Status box -->
        <TextBox x:Name="StatusBox"
                 FontSize="26"
                 Text="你在干嘛？"
                 Background="{x:Null}"
                 Foreground="#C0858685"
                 BorderBrush="#C0858685"
                 AcceptsReturn="True" TextWrapping="Wrap"
                 VerticalAlignment="Top" Height="140" />
        
        <!-- Status toolbox -->
        <Grid Margin="12,-2,12,0"  Height="40">
          <StackPanel x:Name="LocationField" Orientation="Horizontal">
            <Image Source="/Images/addlocation.png" Margin="-4,-1,2,1" />
            <TextBlock x:Name="LocationTextBlock" Text="添加地点" FontSize="26"
                       Style="{StaticResource PhoneTextSubtleStyle}" Margin="0" />
          </StackPanel>
          <TextBlock x:Name="CharCounter" Text="0/240" FontSize="26"
                     HorizontalAlignment="right"
                     Style="{StaticResource PhoneTextSubtleStyle}" Margin="50,0,0,0" />
          <!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
            <Image x:Name="FriendButton" Source="/Images/at.png" Margin="0,0,25,0" Tap="FriendButton_Tap" />
            <Image x:Name="EmotionButton" Source="/Images/smile.png" Tap="EmotionButton_Tap" Margin="0,0,-3,0" />
          </StackPanel>-->
        </Grid>
        
        <!-- Emotion panel -->
        <ListBox x:Name="EmotionPanel" Visibility="Collapsed"
                 ItemsSource="{Binding EmotionList}" Margin="12,10,12,0">
          <ListBox.ItemTemplate>
            <DataTemplate>
              <StackPanel Orientation="Horizontal" Height="50" Margin="-1,0,0,-2">
                <Image Source="{Binding Item0}" Height="40" Tap="Emotion_Tap" Margin="0,0,26,10" />
                <Image Source="{Binding Item1}" Height="40" Tap="Emotion_Tap" Margin="0,0,26,10" />
                <Image Source="{Binding Item2}" Height="40" Tap="Emotion_Tap" Margin="0,0,26,10" />
                <Image Source="{Binding Item3}" Height="40" Tap="Emotion_Tap" Margin="0,0,26,10" />
                <Image Source="{Binding Item4}" Height="40" Tap="Emotion_Tap" Margin="0,0,26,10" />
                <Image Source="{Binding Item5}" Height="40" Tap="Emotion_Tap" Margin="0,0,26,10" />
                <Image Source="{Binding Item6}" Height="40" Tap="Emotion_Tap" Margin="0,0,0,10" />
              </StackPanel>
            </DataTemplate>
          </ListBox.ItemTemplate>
        </ListBox>
      </StackPanel>
    </Grid>

  </Grid>

  <!--Sample code showing usage of ApplicationBar-->
  <phone:PhoneApplicationPage.ApplicationBar>
    <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
      <shell:ApplicationBarIconButton IconUri="/Images/AppBar/sendtext.png" Text="发布" Click="Publish_Clicked" />
      <shell:ApplicationBarIconButton IconUri="/Images/AppBar/at.png" Text="点名" Click="FriendButton_Clicked" />
      <shell:ApplicationBarIconButton IconUri="/Images/AppBar/smile.png" Text="表情" Click="EmotionButton_Clicked" />
    </shell:ApplicationBar>
  </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>